
rem
	bbdoc: Everything that moves came from this type
end rem
Type TActor
	'coordinates
	Field x, y:Int
	Field code:Int
	
	Field dmg:Int
	Field health:Int
		
	Method Move(x, y)
		If testMap.map[Self.x + x, Self.y + y].collides = True Then
			Return testMap.map[Self.x + x, Self.y + y].code
		EndIf
		Local Actor:TActor
		For Actor = EachIn actorList
			If Self.x + x = Actor.x And Self.y + y = Actor.y Then 
				Attack(Actor)
				Return 2
			EndIf
		Next
		'Move yourself
		Self.x:+x
		Self.y:+y
		
		Return 1
	End Method

	Method Draw()
		camera.Draw(code, x, y)
	End Method
	
	Method Update()
	End Method
	
	Method Attack(Handle:TActor)
		Handle.health:-Self.dmg
	End Method
End Type
